package ro.myApp.esb.transformers;

import org.mule.api.MuleMessage;
import org.mule.api.transformer.TransformerException;

import ro.myApp.commons.dto.BaseDtoMessage;
import ro.myApp.esb.messages.EsbMessage;
import ro.myApp.esb.messages.EsbMessageTransactionRequired;

public class BaseDtoMessageToEsbMessageTransactionRequiredTransformer extends
		BaseDtoMessageToEsbMessageTransformer {

	@Override
	public Object transform(MuleMessage arg0, String arg1)
			throws TransformerException {
		BaseDtoMessage src = (BaseDtoMessage)arg0.getOrginalPayload();
		EsbMessage j = new EsbMessageTransactionRequired(src);
		j.setUserName(super.getUserName());
		return j;
	}
	
}
